﻿using Microsoft.EntityFrameworkCore;
using WidgetsDesign.API.DataBase;
using WidgetsDesign.API.Models;

namespace WidgetsDesign.API.Services
{
    public class WidgetsListRepository : IWidgetsListRepository
    {
        private readonly AppDbContext _context;
        public WidgetsListRepository(AppDbContext context)
        {
            _context = context;
        }
        public async Task<IEnumerable<WidgetsList?>> GetWidgetsListsAsync()
        {
            var query = from u in _context.WidgetsList select u;
            return await query.ToListAsync();
        }
    }
}


